﻿<!--
    Dialog ToChuc
    Use for create and edit ToChuc
    >>> Author: cyworld8x
-->
    <Window xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"  
        x:Class="OODCRM.Dialogs.ToChucDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Dialog Tổ chức" Height="610" Width="Auto" MinHeight="610" MinWidth="600">
    <Grid Height="Auto" Width="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="120"/>

        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>        

            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TabControl Grid.Column="0" Grid.ColumnSpan="2"  Name="tabControl_tabThemToChucDialog" VerticalAlignment="Top" >
            <TabItem Header="Thông tin chung" Name="tabItemThongTinChung_tabThemToChucDialog">
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>

                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>

                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>


                    <Border Margin="5" CornerRadius="5" Grid.ColumnSpan="2" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Mã hiệu (*)" Margin="5"/>
                            <TextBox x:Name="tbxMaHieu_tabThemToChucDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         MinWidth="150" Text="{Binding MaHieu}"/>
                            <TextBlock Text="Tên tổ chức (*)" Margin="5" Grid.Row="1"/>
                            <TextBox x:Name="tbxTenToChuc_tabThemToChucDialog" Grid.Row="1" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                         Text="{Binding TenToChuc}" />
                            <TextBlock Text="Chủ quản " Margin="5" Grid.Row="2"/>
                            <TextBox x:Name="tbxChuQuan_tabThemToChucDialog" Grid.Row="2" 
                         Grid.Column="1"  Margin="5"
                         Text="{Binding TenToChuc}"  />
                            <Button x:Name="btnDoiChuQuan_tabThemToChucDialog" Content="Đổi" Grid.Row="2" 
                         Grid.Column="2"  Margin="5"                        
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
                Width="60" IsDefault="True"/>

                        </Grid>
                    </Border>
                    <Border Margin="5,5,5,5" CornerRadius="5" Grid.Row="1" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                            </Grid.RowDefinitions>

                            <TextBlock Text="Loai " Margin="5"/>
                            <ComboBox x:Name="cbxLoaiToChuc_tabThemToChucDialog" Grid.Row="0" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding LOAITOCHUC}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenLoaiToChuc}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Lĩnh vực" Margin="5" Grid.Row="1" />
                            <ComboBox x:Name="cbxLinhVuc_tabThemToChucDialog" Grid.Row="1" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding LINHVUC}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenLinhVuc}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Số lượng nhân viên" Margin="5" Grid.Row="2" />
                            <ComboBox x:Name="cbxSLNhanVien_tabThemToChucDialog" Grid.Row="2" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding SLNHANVIEN}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding SLNVTu+SLNVDen}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Doanh thu năm" Margin="5" Grid.Row="3" />
                            <ComboBox x:Name="cbxDoanhThuNam_tabThemToChucDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding DOANHTHUNAM}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding DoanhThuTu+DoanhThuDen}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Mã số thuế" Margin="5" Grid.Row="4" />
                            <TextBox x:Name="tbxMaSoThue_tabThemToChucDialog" Grid.Row="4" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                         Text="{Binding MaSoThue}" />
                            <TextBlock Text="Ngân hàng" Margin="5" Grid.Row="5" Grid.RowSpan="2"/>
                            <TextBox x:Name="tbxNganHang_tabThemToChucDialog" Grid.Row="5" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"  MinHeight="60"
                         Text="{Binding NganHang}" />
                            <TextBlock Text="Diễn giải" Margin="5" Grid.Row="6" Grid.RowSpan="2"/>
                            <TextBox x:Name="tbxDienGiai_tabThemToChucDialog" Grid.Row="6" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"  MinHeight="80"
                         Text="{Binding DienGiai}" />


                        </Grid>
                    </Border>
                    <Border Margin="5,5,5,5" CornerRadius="5"  Grid.Row="1" Grid.Column="2" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>


                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Tel" Margin="5"/>
                            <TextBox x:Name="tbxTel_tabThemToChucDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2" 
                         MinWidth="150" Text="{Binding Tel}"/>
                            <TextBlock Text="Fax" Margin="5" Grid.Row="1"/>
                            <TextBox x:Name="tbxFax_tabThemToChucDialog" Grid.Row="1" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                         Text="{Binding Fax}" />
                            <TextBlock Text="Email " Margin="5" Grid.Row="2"/>
                            <TextBox x:Name="tbxEMail_tabThemToChucDialog" Grid.Row="2" 
                         Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                         Text="{Binding Email}"  />
                            <TextBlock Text="Website " Margin="5" Grid.Row="3"/>
                            <TextBox x:Name="tbxWebSite_tabThemToChucDialog" Grid.Row="3" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                         Text="{Binding WebSite}"  />
                            <TextBlock Text="Đánh giá " Margin="5" Grid.Row="4"/>
                            <TextBox x:Name="tbxDanhGia_tabThemToChucDialog" Grid.Row="4" 
                         Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                         Text="{Binding DanhGia}"  />
                            <TextBlock Text="Phân loại" Margin="5" Grid.Row="6" />
                            <ComboBox x:Name="cbxPhanLoai_tabThemToChucDialog" Grid.Row="6" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAI}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenPhanLoai}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Loại sở hữu" Margin="5" Grid.Row="7" />
                            <ComboBox x:Name="cbxLoaiSoHuu_tabThemToChucDialog" Grid.Row="7" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAI}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenPhanLoai}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Mã chứng khoán " Margin="5" Grid.Row="8"/>
                            <TextBox x:Name="tbxMaChungKhoan_tabThemToChucDialog" Grid.Row="8" 
                         Grid.Column="1" Grid.ColumnSpan="3" Margin="5"
                         Text="{Binding MaChungKhoan}"  />
                            <TextBlock Text="Chủ sở hữu " Margin="5" Grid.Row="9"/>
                            <TextBox x:Name="tbxChuSoHuu_tabThemToChucDialog" Grid.Row="9" 
                         Grid.Column="1"  Margin="5"
                         Text="{Binding TenToChuc}"  />
                            <Button x:Name="btnDoiChuSoHuu_tabThemToChucDialog" Content="Đổi" Grid.Row="9" 
                         Grid.Column="2"  Margin="5"                        
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
                Width="60" IsDefault="True"/>
                            <CheckBox x:Name="chkDungChung_tabThemToChucDialog" Content="Dùng chung"  Grid.Column="1"  Grid.Row="10"  Margin="5,20,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding NgungTheoDoi}"/>


                        </Grid>
                    </Border>
                    <Border Margin="5" CornerRadius="5" Grid.Row="3" Grid.ColumnSpan="2" >
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="110"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                            </Grid.RowDefinitions>
                            <CheckBox x:Name="chkNgungTheoDoi_tabThemToChucDialog" Content="Ngừng theo dõi" Margin="5,5,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding NgungTheoDoi}"/>
                            <TextBlock Text="Là chủ sở hữu từ ngày " Margin="5" Grid.Row="0" Grid.Column="1"
                           HorizontalAlignment="Right" VerticalAlignment="Top"/>
                            <toolkit:DatePicker x:Name="dpNgaySoHuu__tabThemToChucDialog" Grid.Row="0" Grid.Column="2" Text="{Binding NgayLapToChuc}"  />

                            
                        </Grid>
                    </Border>
                </Grid>
            </TabItem>
            <TabItem Header="Địa chỉ" Name="tabItemDiaChi_tabThemToChucDialog">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>

                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>

                        
                    </Grid.RowDefinitions>
                    <Border Margin="5" CornerRadius="5" Grid.Column="0" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Địa chỉ thanh toán:" Margin="5"/>
                            <TextBox x:Name="tbxDiaChiTT_tabThemToChucDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         MinHeight="100" Text="{Binding DiaChiThanhToan}"/>                            
                            <TextBlock Text="Tỉnh/Tp " Grid.Row="2" Margin="5"/>
                            <ComboBox x:Name="cbxTinhThanhTT_tabThemToChucDialog" Grid.Row="2" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Quận/Huyện" Grid.Row="3" Margin="5"/>
                            <ComboBox x:Name="cbxQuanHuyenTT_tabThemToChucDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Địa chỉ thanh toán:" Grid.Row="4" Margin="5"/>
                            <TextBox x:Name="tbxMaVungTT_tabThemToChucDialog" Grid.Row="4" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Quốc gia " Grid.Row="5" Margin="5"/>
                            <ComboBox x:Name="cbxQuocGiaTT_tabThemToChucDialog" Grid.Row="5" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>

                        </Grid>
                    </Border>
                    <Border Margin="5" CornerRadius="5" Grid.Column="1" BorderBrush="#FF149A08" BorderThickness="1">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="70"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>

                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Địa chỉ chuyển hàng:" Margin="5"/>
                            <TextBox x:Name="tbxDiaChiCH_tabThemToChucDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         MinHeight="100" Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Tỉnh/Tp " Grid.Row="2" Margin="5"/>
                            <ComboBox x:Name="cbxTinhThanhCH_tabThemToChucDialog" Grid.Row="2" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Quận/Huyện " Grid.Row="3" Margin="5"/>
                            <ComboBox x:Name="cbxQuanHuyenCH_tabThemToChucDialog" Grid.Row="3" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                            <TextBlock Text="Địa chỉ thanh toán:" Grid.Row="4" Margin="5"/>
                            <TextBox x:Name="tbxMaVungCH_tabThemToChucDialog" Grid.Row="4" Grid.Column="1" Margin="5" Grid.ColumnSpan="2"
                         Text="{Binding DiaChiThanhToan}"/>
                            <TextBlock Text="Quốc gia " Grid.Row="5" Margin="5"/>
                            <ComboBox x:Name="cbxQuocGiaCH_tabThemToChucDialog" Grid.Row="5" 
                          Grid.Column="1" Grid.ColumnSpan="2" Margin="5"
                          SelectedValue="{Binding VITRIDIALY}">
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding TenVTDL}"/>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>

                        </Grid>
                    </Border>
                </Grid>
            </TabItem>
        </TabControl>
        <Button x:Name="btnCat_tabThemToChucDialog" Content="Cất" Grid.Row="1" Grid.Column="0" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35"  IsDefault="True"/>
        <Button x:Name="btnHuyBo_tabThemToChucDialog" Content="Huỷ bỏ" Grid.Row="1" Grid.Column="1" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35" IsCancel="True"/>
    </Grid>
</Window>
